package com.bootdo.lgs.ordertrace.dao;

import com.bootdo.lgs.order.model.LgsOrder;
import com.bootdo.lgs.ordertrace.model.LgsOrderStatusUpdate;
import com.bootdo.lgs.ordertrace.model.OrderTrace;
import com.bootdo.lgs.ordertrace.model.UnCheckCondition;
import org.apache.ibatis.annotations.Delete;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface OrderTraceMapper {

	OrderTrace findById(Long id);

	int updateByCondition(Map condition);

	List<OrderTrace> getList(Long orderId);

	List<LgsOrder> getUnCheckOrderTrace(UnCheckCondition condition);

	int batchAdd(List<Map> condition);

	int deleteByOrderId(Long orderId);

	int batchUpdate(List<LgsOrderStatusUpdate> condition);

	int batchDelete(List<Long> orderIds);

	@Delete("delete from lgs_order_trace where id = #{id}")
	int deleteById(Long id);
}
